<!-- compnents/Father.vue -->
<template>
    <div>
      <h2>这是Father组件</h2>
      <h3>路由传入的参数为：{{ route.query.msg }}</h3>
    </div>
  </template>
  
  <script setup lang="ts">
  import { ref } from "vue";
  // 路由接收参数
  import { useRoute } from "vue-router";
  const route = useRoute();
  // 接收路由传入的参数
  let routeMsg = ref("");
  if (route.query.msg) {
    routeMsg.value = route.query.msg as string;
  }
  </script>
  
  <style scoped></style>
  
  